# TODO A代表卒，B代表终点,horse代表马,nums代表路线的数量
import random
A=(0,0)
a,b,c,d=map(int,input().split())
B=(a,b)
horse=(c,d)
Horse={(horse[0]-2,horse[1]+1),
       (horse[0]-1,horse[1]+2),
       (horse[0]+1,horse[1]+2),
       (horse[0]+2,horse[1]+1),
       (horse[0]+2,horse[1]-1),
       (horse[0]+1,horse[1]-2),
       (horse[0]-1,horse[1]-2),
       (horse[0]-2,horse[1]-1)}
def judge(A,B):
    nums=0
    solder={A}
    while A[0]<B[0] and A[1]<B[1]:
        steps=random.randint(0,1)
        if steps==0 and A[0]<B[0]:
            run_right(A)
        else:
            run_up(A)
        
        if A in Horse:
            continue;
        if A==B:
            nums+=1
            continue
    print(nums)

def run_right(A):
        if A[0]<B[0]:
            A=(A[0]+1,A[1])
def run_up(A):
        if A[1]<B[1]:
            A=(A[0],A[1]+1)


judge(A,B)